/**
 * 受理条件的js api
 */
import request from "@/utils/request";

/**
 * 保存办理条件
 * @param {*} data
 */
export function saveOrUpdate(data) {
  return request({
    url:
      process.env.VUE_APP_KSTB_ROUTE_PATH +
      "/yxpz/acceptanceCondition/saveOrUpdate",
    method: "post",
    headers: {
      "Content-Type": "application/json;charset=UTF-8"
    },
    data: data
  });
}

/**
 * 根据hdlOid查询受理条件
 * @param {*} hdlOid
 */
export function queryByHdlOid(hdlOid) {
  return request({
    url:
      process.env.VUE_APP_KSTB_ROUTE_PATH +
      `/yxpz/acceptanceCondition/queryByHdlOid/${hdlOid}`,
    method: "post",
    headers: {
      "Content-Type": "application/json;charset=UTF-8"
    }
  });
}

/**
 * 根据id删除受理条件
 * @param {*} id
 */
export function deleteById(id) {
  return request({
    url:
      process.env.VUE_APP_KSTB_ROUTE_PATH +
      `/yxpz/acceptanceCondition/deleteById/${id}`,
    method: "post",
    headers: {
      "Content-Type": "application/json;charset=UTF-8"
    }
  });
}

/**
 * 根据id查询数据
 * @param {*} id
 */
export function getById(id) {
  return request({
    url:
      process.env.VUE_APP_KSTB_ROUTE_PATH +
      `/yxpz/acceptanceCondition/getById/${id}`,
    method: "post",
    headers: {
      "Content-Type": "application/json;charset=UTF-8"
    }
  });
}
